package com.yj.ccs.abs.web.asset.dto;

import com.yj.ccs.abs.common.enums.ContractTransportType;
import com.yj.ccs.abs.web.common.entity.Attachment;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/4/8
 * Author     : Unbelievable9
 **/
@Data
public class UpdateContractDto {

    @NotNull(message = "合同ID不能为空")
    @ApiModelProperty(value = "合同ID", required = true, example = "1")
    private Long id;

    @NotNull(message = "资产ID不能为空")
    @ApiModelProperty(value = "资产ID", required = true, example = "1")
    private Long asset_id;

    @NotNull(message = "卖方(需方)不能为空")
    @ApiModelProperty(value = "买方(需方)", required = true, example = "湖南华润电力鲤鱼江公司")
    private String buyer;

    @NotNull(message = "卖方(供方)不能为空")
    @ApiModelProperty(value = "卖方(供方)", required = true, example = "江苏晋和电力燃料有限公司")
    private String seller;

    @NotNull(message = "合同编号不能为空")
    @ApiModelProperty(value = "合同编号", required = true, example = "JSJH-HRLYJ-20171111-02")
    private String number;

    @NotNull(message = "货物品种不能为空")
    @ApiModelProperty(value = "货物品种", required = true, example = "无烟煤")
    private String goods_type;

    @NotNull(message = "运输方式不能为空")
    @ApiModelProperty(value = "运输方式<br>0-未知<br>1-汽运<br>2-火运<br>3-船运", example = "MOTOR")
    private ContractTransportType transport_type = ContractTransportType.UNKNOWN;

    @ApiModelProperty(value = "合同吨数", example = "10000.00")
    private BigDecimal amount = BigDecimal.ZERO;

    @ApiModelProperty(value = "合同单价", example = "535")
    private BigDecimal unit_price = BigDecimal.ZERO;

    @NotNull(message = "供货期间开始日期不能为空")
    @ApiModelProperty(value = "供货期间开始日期", required = true, example = "2017-12-12")
    private LocalDate supply_start_date;

    @NotNull(message = "供货期间结束日期不能为空")
    @ApiModelProperty(value = "供货期间结束日期", required = true, example = "2018-01-11")
    private LocalDate supply_end_date;

    @NotNull(message = "合同签约日不能为空")
    @ApiModelProperty(value = "合同签约日", required = true, example = "2017-11-11")
    private LocalDate sign_date;

    @ApiModelProperty(value = "合同到期日", example = "2018-01-11")
    private LocalDate expire_date;

    @ApiModelProperty(value = "合同影印件")
    private List<Attachment> files;

    @NotNull(message = "是否委托运输不能为空")
    @ApiModelProperty(value = "是否委托运输", required = true)
    private Boolean consigned = false;

    @ApiModelProperty(value = "委托运输人")
    private String consignee;

    @ApiModelProperty(value = "委托运输协议")
    private List<Attachment> consigned_files;

    @NotNull(message = "是否委托收货不能为空")
    @ApiModelProperty(value = "是否委托收货", required = true)
    private Boolean delivered = false;

    @ApiModelProperty(value = "委托收货人")
    private String deliverer;

    @ApiModelProperty(value = "委托收货协议")
    private List<Attachment> delivered_files;

    @NotNull(message = "是否委托结算不能为空")
    @ApiModelProperty(value = "是否委托结算", required = true)
    private Boolean reckoned = false;

    @ApiModelProperty(value = "委托结算人")
    private String reckoner;

    @ApiModelProperty(value = "委托结算协议")
    private List<Attachment> reckoned_files;
}
